﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace PedesTrainProject.Grid
{
    [Serializable()]
    public class ManualTrigger : ISerializable
    {
        private int period;
        private bool active;

        public bool Active
        {
            get { return active; }
            set { active = value; }
        }

        public ManualTrigger(int _period)
        {

        }

        public ManualTrigger(int _period, bool _active)
        {

        }

        #region Serialize
        public ManualTrigger (SerializationInfo info, StreamingContext ctxt)
        {
            this.period = (int)info.GetValue("Period", typeof(int));
            this.active = (bool)info.GetValue("Active", typeof(bool));
        }

        public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
        {
            info.AddValue("Period", this.period);
            info.AddValue("Active", this.active);
        }
        #endregion
    }
}
